﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/NewsMaster.Master"
	Inherits="System.Web.Mvc.ViewPage<Hotnet.Entity.News>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.Title %>
	-
	<%=Model.NewsCategory.Name%>
	- 新闻首页 - 热点网
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<%
		PictureGroup[] groups = ViewData["RelationalGroups"] as PictureGroup[];
		News[] referenceNews = ViewData["ReferenceNews"] as News[];
		PictureGroup[] referencePictureGroup= ViewData["ReferencePictureGroup"] as PictureGroup[];
		Video[] referenceVideos = ViewData["ReferenceVideo"] as Video[];
		IList<string> tagNames = ViewData["NewsTag"] as IList<string>;
		NewsContent[] newsContents=ViewData["NewsContents"] as NewsContent[];
		int orderNo = int.Parse(ViewData["OrderNo"].ToString());
		
	%>
	
	<div class="naviagteBar">
		<div class="navigateTitle">
			<span><a href="http://www.woxx8.com">窝吧</a></span> >>
			<span><a href="/news">新闻</a></span> >>
			<span><a href="/newsCategory/index/<%=Model.NewsCategory.CategoryID %>"><%=Model.NewsCategory.Name%></a></span> >>
			<span class="currentPosition">
				<%=Model.Title %>
			</span>
		</div>
	</div>
	
	<div class="leftContent">
		<div class="newsTag">
			<a href="/NewsTagSearch/?tagName=<%=HttpUtility.UrlEncode(string.Join(" ", tagNames.ToArray()))%>" target="_blank" style=" text-decoration:none; font-size:14px; margin-left:15px; ">标签:</a>
			<%foreach (string item in tagNames)
			{%>
					<a href="/NewsTagSearch/?tagName=<%=HttpUtility.UrlEncode(item) %>" target="_blank"><%=item %></a>
			<%} %>
		
		</div>
		<div class="newsZone">
			<div class="newsTitle">
				<%=Model.Title%>
			</div>
			<div class="newsSource">
				<%=Model.NewsTime.Value.ToString("yyyy年MM月dd日") %>
				来源:<%=Model.SourceFrom.Name %>
				<a href="javascript:copyTextToClipboard(window.location.href)">复制本文链接</a>
			</div>
			<div class="newsContent">
				<%if (!string.IsNullOrEmpty(Model.ImagePath)&&orderNo==newsContents[0].OrderNo)
				{ %>
						<div class="newsCoverImage">
							<img src="<%=Model.ImagePath %>" alt="" />
						</div>
				<%} %>
				<%=Model.Content %>
			</div>
			<div class="pagination">
			<%for (int i = 0; i < (newsContents.Length>1?newsContents.Count():0); i++)
			{%>
				<%if (newsContents[i].OrderNo == orderNo)
				  { %>
								<span class="currentPage">[<%=i + 1%>]</span>
							<%}
				  else
				  { %>
							<a class="otherPage" href="/News/View/<%=newsContents[i].NewsID %>?orderNo=<%=newsContents[i].OrderNo %>">
								[<%=i + 1%>]
							</a>
							<%} %>
			<% } %>
		</div>
		<div class="referenceNews">
			<div class="moduleTitle">
				<span>相关新闻</span>
			</div>
			<ul>
				<%
					for (int i = 0; i < referenceNews.Length; i++)
					{
				%>
				<li>
					<span style=" font-weight:bolder; font-size:18px;">·</span>
					<a href="/News/View/<%=referenceNews[i].NewsID %>/">
						<%=referenceNews[i].Title%>
					</a>
				</li>
				<% } %>
			</ul>
		</div>
		
		
		</div>

	</div>
	<div class="rightContent">
		<div class="referencePicture">
			<div class="moduleTitle">
				<span>相关图片</span>
			</div>
			<ul>
				<%
					for (int i = 0; i < referencePictureGroup.Length; i++)
					{
				%>
				<li>
					<a href="/Picture/Group/<%=referencePictureGroup[i].GroupID %>/" title="<%=referencePictureGroup[i].Name %>" class="pictureImgFrame">
						<img src="<%=referencePictureGroup[i].CoverImage.ThumbnailPath %>" alt="" />
					</a>
					<div class="pictureTitle">
						<a href="/Picture/Group/<%=referencePictureGroup[i].GroupID %>" target="_blank"><%=StringUtility.CutString(referencePictureGroup[i].Name, 12)%></a>
					</div>
				</li>
				<% } %>
			</ul>
		</div>
		<div class="referenceVideo">
			<div class="moduleTitle">
				<span style="*width:130px; *float:left;_float:none;">您可能喜欢的视频</span>
			</div>
			<ul style=" margin-top:8px;">
			<%for (int i = 0; i < (referenceVideos == null ? 0 : referenceVideos.Length); i++)
			{%>
				<li>
					<a href="<%=VideoHelper.GetPlayUrl(referenceVideos[i]) %>" class="referenceVideoImageLink" target="_blank">
						<img src="/Images/VideoMark1.png" alt="picture" />
					</a>
					<a href="<%=VideoHelper.GetPlayUrl(referenceVideos[i]) %>" target="_blank">
						<%=StringUtility.CutString(referenceVideos[i].Name,20)%>
					</a>
				</li>
				
			<%} %>
			</ul>
		
		</div>
	</div>
	<div style="clear: both;">
	</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="StyleContent" runat="server">
	<style type="text/css">
		
		.naviagteBar
		{
			width:969px;
			font-family:宋体;
		}
		
		
		body a:hover
		{
			color:red;
			text-decoration:underline;
		}
		ul
		{
			margin:0px;
			padding:0px;
		}
		li
		{
			list-style-type: none;
		}
		.leftContent
		{
			float: left;
			width: 620px;
			border: 1px solid #c3c3c3;
			min-height:858px;
		}
		.rightContent
		{
			float: right;
			width:328px;
			background-color:#E4F5F6;
		}
		/*新闻区域*/
		.newsZone
		{
			padding:3px;
			border-bottom:1px solid #c3c3c3;
		}
		.newsTitle
		{
			font-family:黑体;
			font-size:20px;
			color:Black;
			text-align:center;
			margin-top:40px;
		}
		.newsSource
		{
			margin-top:3px;
			text-align:center;
		}
		.newsContent
		{
			font-size:14px;
			margin-top:35px;
			padding:5px 20px;
		}
		.newsContent p
		{
			line-height:170%;
		}
		.newsCoverImage
		{
			float:left;
			margin-right:10px;
		}
		.newsCoverImage img
		{
			max-width:400px;
		}
		
		.pagination
		{
			text-align:center;
			font-size:14px;
		}
		
		.currentPage
		{
			color:Red;
		}
		
		.pagination .otherPage
		{
			color:Black;
			padding:0px 2px;
			margin:0px;
			
		}
		.pagination a
		{
			text-decoration:none;
		}
		
		.pagination a:hover
		{
			color:Red;
			
		}
		
		/*相关新闻*/
		.referenceNews
		{
			
			border-left:none;
			border-bottom:none;
			font-size:14px;
		}
		.referenceNews a
		{
			color:#124C9A;
			text-decoration:none;
		}
		.referenceNews ul
		{
			 margin-left:5px;
		}
		.referenceNews li
		{
			margin-top:2px;
		}
		/*相关图片*/
		.referencePicture
		{
			/*border:1px solid #c3c3c3;*/
			border-left:none;
			border-top:none;
			float:left;
			
		}
		.referencePicture ul
		{
			margin: 0px;
			padding: 0px;
			margin-left: 7px;
		}
		.referencePicture li
		{
			list-style: none;
			float: left;
			width: 160px;
			height: 160px;
		}
		.referencePicture .pictureTitle
		{
			width: 130px;
			font-size: 14px;
			line-height: 130%;
			text-align: center;
			overflow: hidden;
			
		}
		.referencePicture .pictureTitle a
		{
			color:#124C9A;
			text-decoration:none;
		}
		.referencePicture .pictureTitle a:hover
		{
			color:Red;
			text-decoration:underline;
		}
		.referencePicture img
		{
			border: none;
			padding: 5px 0px 4px 5px;
			height: 106px;
			width: 140px;
		}
		.pictureImgFrame
		{
			float: left;
			width: 150px;
			height: 118px;
			background: transparent url(/images/picbg_2.gif) no-repeat scroll;
		}
		
		/*news tag样式*/
		.newsTag
		{
			float:left;
			padding:3px 14px;
			border:solid 1px #c3c3c3;
			border-top:none;
			border-left:none;
			background: transparent url(/images/pin.png) no-repeat scroll 8px 1px;
		}
		.newsTag a
		{
			color:#FF0099;
		}
		.newsTag a:hover
		{
			font-size:14px;
			color:#FF0099;
		}
		
		/*相关视频*/
		.referenceVideo
		{
			line-height:normal;
			float:left;
		}
		
		.referenceVideo li
		{
			 float:left;
			 width:328px;
			 *height:23px;
		}
		
		.referenceVideo a
		{
			color:#124C9A;
			font-size:14px;
			text-decoration:none;
		}
		
		.referenceVideoImageLink
		{
			float:left;
			margin-left:2px;
			margin-bottom:4px;
			margin-right:2px;
		}
		
		.referenceVideo img
		{
			border:none;
		}
		
		/* Module 标题 */
		.moduleTitle
		{
			color:#BC2D09;
			font-weight:bold;
			font-size:14px;
			background:transparent url(/images/headerblue.gif) repeat-x scroll 0 8px;
			margin:0 2px 0 2px;
			padding:3px 2px 3px 0px;
		}
		.moduleTitle span{
			background:white none repeat scroll 0 0;
			padding-right:8px;
		}
		
		
		
		
		</style>
</asp:Content>
